//
//  OtherTableViewCell.m
//  Article
//
//  Created by LONG on 16/4/22.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "OtherTableViewCell.h"

@implementation OtherTableViewCell


-(void)configModel:(MateModel *)model{
    if (![model.ad_top isEqualToString:@"1"]) {
        self.ad_top.hidden = YES;
    }
    if (![model.ad_bottom isEqualToString:@"1"]) {
        self.ad_bottom.hidden = YES;
    }
    
    if ([model.type isEqualToString:@"imgtext"]){
        self.kindLab.text = @"图文";
        [self.ad_img sd_setImageWithURL:[NSURL URLWithString:model.ad_img]];
        self.ad_code_title.text = model.ad_pro_title;
        self.ad_code_des.text = model.ad_pro_des;
        self.ad_address.hidden = YES;
    }else if ([model.type isEqualToString:@"vcard"]){
        self.kindLab.text = @"名片";
        [self.ad_img sd_setImageWithURL:[NSURL URLWithString:model.ad_head]];
        self.ad_code_title.text = model.ad_name;
        self.ad_code_des.text = model.ad_mobile;
        self.ad_address.text = model.ad_address;
    }else if ([model.type isEqualToString:@"tdcode"]){
        self.kindLab.text = @"二维码";
        [self.ad_img sd_setImageWithURL:[NSURL URLWithString:model.ad_code_img]];
        self.ad_code_title.text = model.ad_code_title;
        self.ad_code_des.hidden = YES;
        self.ad_address.hidden = YES;
        //self.ad_code_des.text = model.ad_code_des;
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
